package com.beaven.model.model.card;

import com.beaven.model.model.db.Category;
import java.util.Date;

/**
 * author: Beaven
 * time: 2017/5/24 10:36
 */

public class CategoryCard {
  // Id
  private String name;
  // 名称
  private String ownerId;
  // 创建者Id
  private Date createAt;
  // 创建时间
  private Date modifyAt;
  // 最后修改时间
  private String id;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getOwnerId() {
    return ownerId;
  }

  public void setOwnerId(String ownerId) {
    this.ownerId = ownerId;
  }

  public Date getCreateAt() {
    return createAt;
  }

  public void setCreateAt(Date createAt) {
    this.createAt = createAt;
  }

  public Date getModifyAt() {
    return modifyAt;
  }

  public void setModifyAt(Date modifyAt) {
    this.modifyAt = modifyAt;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  @Override public String toString() {
    return "CategoryCard{"
        + "name='"
        + name
        + '\''
        + ", ownerId='"
        + ownerId
        + '\''
        + ", createAt="
        + createAt
        + ", modifyAt="
        + modifyAt
        + ", id='"
        + id
        + '\''
        + '}';
  }

  public Category build(Category category) {
    category.setId(this.id);
    category.setName(this.name);
    category.setOwnerId(this.ownerId);
    category.setModifyAt(this.modifyAt);
    return category;
  }
}
